<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="" content="">
  <title></title>
  <style></style>
</head>

<body>
  <p>ok</p>
  <div id = 'a1' class = 'b1'>aaa <div id = 'a1z'>azazaz</div></div>
  <div id = 'a2' class = 'b2'>bbb</div>
  <div id = 'a3' class = 'b3'>ccc</div>


  <script>

    //查找元素
    // const a = document.getElementById('a1')
    // console.log(a.innerText)
    // const b = document.getElementsByClassName('b2')
    // console.log(b[0].innerText)
    // const c = document.getElementsByTagName('div')
    // console.log(c[2].innerText)

    //子父查找
    const a = document.getElementById('a1')
    const az = a.childNodes
    console.log(az)

  </script>
</body>

</html>